<script type="text/javascript">
    parent.Topics.appendImageFromUpload([<%= @photos.collect { |p| "'#{p.image.url}'" }.join(",") %>]);
</script>